<template>
	<SearchForm :columns="formColumn" @search="search" @reset="search" />
	<el-main class="nopadding">
		<scTable
			ref="table"
			tableName="studentList"
			v-bind="list"
			row-key="id"
			stripe
		>
			<el-table-column type="selection" width="50"></el-table-column>
		</scTable>
	</el-main>
</template>

<script>
import SearchForm from "@/components/SearchForm/index.vue";
import { formColumn, column } from "./data";

export default {
	components: {
		SearchForm,
	},
	data() {
		return {
			formColumn,
			list: {
				apiObj: this.$API.student.classManagementList,
				params: {},
				column,
			},
		};
	},
	methods: {
		search(searchParams) {
			const params = Object.assign({}, this.list.params, searchParams);
			this.$refs.table.reload(params);
		},
	},
};
</script>

